(define (split-at lst n)
  (cond 
    ((= n 0)
     (cons nil lst))
    ((eqv? lst nil)
     (cons nil nil))
    (#t
     (begin
      (define sub_lst (split-at (cdr lst) (- n 1)))
      (cons (cons (car lst) (car sub_lst))
            (cdr sub_lst))))))

(define (compose-all funcs)
  (lambda (x)
    (cond 
      ((eqv? funcs nil)
       x)
      (#t
       ((compose-all (cdr funcs)) ((car funcs) x))))))
